
// face_recDlg.h : header file
//

#pragma once

#include <string>

typedef enum
{
	EN_WORK_IDLE,
	EN_WORK_RECING,
	EN_WORK_SAMPLING,
	MAX_NUM_WORK_MODE,
}en_current_mode;

// Cface_recDlg dialog
class Cface_recDlg : public CDialogEx
{
// Construction
public:
	Cface_recDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
#ifdef AFX_DESIGN_TIME
	enum { IDD = IDD_FACE_REC_DIALOG };
#endif

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support


// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnBnClickedOk();

private :
	HANDLE m_hThreadImg;
	HANDLE m_hThreadRec;
	int m_currWorkMode;

	std::string m_pathPicDb;
	float m_recThreshold;
public:
	afx_msg void OnBnClickedBtnSample();

public:
	int getCurrentWorkMode(void);
	void setCurrWorkMode(int modeIn);
	afx_msg void OnBnClickedBtnStuNum();

	void initPicDbPath(const char * strIn);

	void getPicDbPath(std::string & strOut);

	float getRecThreshold(void);

	void setRecThreshold(float thresholdIn);
	virtual void OnCancel();
	afx_msg void OnDestroy();
};

typedef struct
{
	void * pCapCamera;
	void * pWinHandle;
}param_img_proc;

typedef struct
{
	void * pWinHandle;
	void * pRecConfig;
}param_rec_proc;


typedef struct
{
	WCHAR name[128];
	WCHAR number[128];
}rec_result;

DWORD WINAPI ThreadImg(LPVOID lpParam);

DWORD WINAPI ThreadRec(LPVOID lpParam);